<template>
	<a-layout-content v-if="ifshow_list"
	                  style="flex: 0 0 1270px;min-width: 1270px;max-width: 1270px;width: 1270px;position: relative;background: #ffffff !important;">
		<right-top icon="2.png" :text="ruleNames">
			<a-tabs default-active-key="1" style="position: absolute;right: 40px;top: 22px;font-weight: 400;" size="small"
			        @change="callback">
				<a-tab-pane key="1" tab="事件数据"></a-tab-pane>
				<a-tab-pane key="2" tab="统计分析" force-render></a-tab-pane>
			</a-tabs>
		</right-top>
		<div class="right-content" v-show="change==1">
			<a-form-model :model="form1" layout="inline">
				<a-row style="margin-top: 10px;">
					<a-col :span="20">
						<a-form-model-item label="媒体类型" :label-col="{span:3}" :wrapper-col="{span:21}"
						                   style="width: 100%;display: flex;align-items: center;">
							<a-checkbox :indeterminate="indeterminate1" :checked="AllCheckmedia" @change="onCheckAllChange_media">
								全部
							</a-checkbox>
							<a-checkbox-group v-model="checkedList_media" @change="onChange_media">

								<a-checkbox v-if="i<8" :value="item.mediaName" v-for="(item,i) in media_type">
									{{ item.mediaName }}
								</a-checkbox>
							</a-checkbox-group>
						</a-form-model-item>
					</a-col>

					<a-col :span="4" :pull="1">
                                <span @click="showOtherMedia" style="position: absolute;left: 36%">
                                  <span style="color: #1777FF;cursor: pointer;font-size: 12px;">查看更多类型</span><div
		                                style="transform: rotate(90deg);font-size: 12px;display: inline-block;color: #1777FF;margin-left: 3px;cursor: pointer">&gt;&gt;</div>
                                </span>
					</a-col>
				</a-row>
				<!--下拉-->
				<a-row style="position: relative;top: 0px;margin-bottom: 0px;" :style="collspanMedia?'display:none':''">
					<a-col :span="21" :push="2" style="margin-left: 2%;">
						<a-checkbox-group v-model="checkedList_media2" @change="onChange_media1">
							<a-checkbox v-if="i>=8&&!collspanMedia" :value="item.mediaName" v-for="(item,i) in media_type">
								{{ item.mediaName }}
							</a-checkbox>
						</a-checkbox-group>
					</a-col>
				</a-row>

				<a-row style="margin-top: 10px;margin-left: 4%">

					<a-col :span="2" style="margin-top: -0.55%;">
						<a-select :default-value="1" @change="if_query">
							<a-select-option :value="1">全文</a-select-option>
							<a-select-option :value="2">标题</a-select-option>
						</a-select>
					</a-col>
					<a-col :span="6">
						<a-form-model-item label="" :label-col="{span:4}" :wrapper-col="{span:24}" enterable='false'
						                   style="width: 100%">
							<a-input v-model="text" style="height: 32px;margin-top: 0.5%;"/>
						</a-form-model-item>
					</a-col>

					<a-col :span="4">
						<a-form-model-item label="倾向性" :label-col="{span:8}" :wrapper-col="wrapperCol" style="width: 100%;">
							<a-select default-value="0" v-model="query.emotionalPolarity">
								<a-select-option value="0">全部</a-select-option>
								<a-select-option value="1">正面</a-select-option>
								<a-select-option value="2">中性</a-select-option>
								<a-select-option value="3">负面</a-select-option>
							</a-select>
						</a-form-model-item>
					</a-col>

					<a-col :span="4">
						<a-form-model-item label="关键词" :label-col="labelCol" :wrapper-col="wrapperCol" style="width: 100%;">
							<a-input v-model="query.keyword" style="height: 32px;margin-top: 0.5%;"/>
						</a-form-model-item>

					</a-col>

					<a-col :span="4">
						<a-form-model-item label="文章级别" :label-col="labelCol" :wrapper-col="wrapperCol" style="width: 100%;">
							<a-select default-value="" v-model="query.levelInference">
								<a-select-option value="">全部</a-select-option>
								<a-select-option value="3">重要级别</a-select-option>
								<a-select-option value="2">中等级别</a-select-option>
								<a-select-option value="1">一般级别</a-select-option>
							</a-select>
						</a-form-model-item>
					</a-col>


					<a-col :span="2" style="display: flex;align-items: center;height: 50px;">
						<a-button style="color: black;margin-top: -18%;margin-left: 10%" @click="queryInfomationData"><img
								src="../../assets/images/system/fangda.png" style="margin-right: 3px;"/>查询
						</a-button>
						<a-button style="color: black;margin-top: -18%;margin-left: 5px" @click="reset">重置</a-button>

						<img src="../../assets/images/generalDetection/20.png" alt=""
						     style="margin-top: -15%;cursor: pointer;height: 66%;margin-left: 10%" @click="showQuery">
					</a-col>
				</a-row>

				<a-row style="position: relative;" :style="collspanQuery?'display:none':''">

					<a-col :span="5" style="padding-left: 3%;">
						<a-form-model-item label="发布媒体" :label-col="labelCol" :wrapper-col="wrapperCol" style="width: 100%;">
							<a-input v-model="query.informationSources" style="height: 32px;"/>
						</a-form-model-item>
					</a-col>
					<a-col :span="5" style="">
						<a-form-model-item label="图片识别" :label-col="labelCol" :wrapper-col="wrapperCol" style="width: 100%;">
							<a-select v-model="imageRecognition">
								<a-select-option value="0">全部</a-select-option>
								<a-select-option :value="2">只看图片识别</a-select-option>
								<a-select-option :value="1">排除图片识别</a-select-option>
							</a-select>
						</a-form-model-item>

					</a-col>
					<a-col :span="9" style="margin-left:30px">
						<a-form-model-item lable="发布时间">
							<span style="font-size: 14px;letter-spacing: 1px;color: #0f1a27;font-weight: normal;margin-top: -4%;">发布时间:</span>
							<a-range-picker
									v-model="query.releaseTime"
									:show-time="{ format: 'HH:mm' }"
									format="YYYY-MM-DD HH:mm"
									:placeholder="['开始时间', '结束时间']"
									style="padding-left:10px;"
							/>
						</a-form-model-item>
					</a-col>
				</a-row>
				<a-row style="position: relative;" :style="collspanQuery?'display:none':''">
					<a-col :span="5" style="marign-left:20px">
						<a-form-model-item label="作者" :label-col="{span:8}" :wrapper-col="wrapperCol" style="width: 100%;">
							<a-input v-model="query.author" style="height: 32px;margin-top: 0.5%;"/>
						</a-form-model-item>
					</a-col>
				</a-row>
				<a-row style="margin-left: 2.2%;margin-right:27px;background-color: #F7F7F7;">
					<a-col :span="16">
						<a-checkbox style="margin: 0 20px;" :indeterminate="indeterminate" :checked="checkAll"
						            @change="onCheckAllChange">全选
						</a-checkbox>
						<a-button style="margin-right: 10px;color: black;" @click="exportInfomation">导出数据</a-button>
						<a-button style="margin-right: 10px;color: black" @click="deleteinfomation">删除</a-button>
						<div style="display: inline-block;margin-left: 5px;">当前共搜索数据<span
								style="color: red">{{ total }}</span>条
						</div>
					</a-col>
					<a-col :span="3" style="float: right">
						<a-button style="color: black;float:right;margin-right:20px;margin-top:12px" @click="sequenceInfomation">
							时间排序<img
								src="../../assets/images/system/paixu.png" style="margin-left: 3px;"/></a-button>
					</a-col>

				</a-row>
			</a-form-model>
			<a-checkbox-group v-model="checkedList" @change="onChangeList" class="listgroup" style="width:100%">
				<!-- 列表 start -->
				<a-list item-layout="vertical" size="large" :pagination="pagination" :data-source="listData"
				        style="padding: 0 27px;" v-if="flat">
					<a-list-item slot="renderItem" key="item.title" slot-scope="item, index"
					             style="border: 1px solid #ddd;margin-bottom: 10px;padding-left: 50px;">
						<a-list-item-meta>
							<div v-if="index+1==1" slot="avatar" style="margin-left: -50px;margin-top: -16px; border-style: solid;border-width: 0px 0px 50px 50px ;
                border-color: transparent transparent transparent #1577FE;width: 0px;height: 0px;color: #fff;font-size: 14px;">
								<span style="position: relative;left: -40px;top: 5px;">{{ index + 1 }}</span>
							</div>
							<div v-else slot="avatar" style="margin-left: -50px;margin-top: -16px; border-style: solid;border-width: 0px 0px 50px 50px ;
                border-color: transparent transparent transparent #9CC4FF;width: 0px;height: 0px;color: #fff;font-size: 14px;">
								<span style="position: relative;left: -40px;top: 5px;">{{ index + 1 }}</span>
							</div>

							<div slot="avatar">
								<a-checkbox style="position: relative;left: -30px;top: 10px;" :value="item.id"></a-checkbox>
							</div>
							<div slot="description" style="display: flex;">
								<div style="width:98%;">
									<span :title="item.content">{{ item.content.substring(0, 130) }}...</span>
									<span style="color: #0D1F32"><a :href="item.url" :title="item.url" target="_blank">查看原文</a></span>
								</div>
							</div>
							<div slot="title" style="display:flex">
								<div slot="title" style="font-weight: bold;color: black;width:70%;cursor: pointer;"
								     @click="changePageInfo(item.id)" :title="item.title">{{ item.title.substring(0, 40) }}<span
										:style="item.title.length > 40 ?'':'visibility: hidden'">...</span></div>
								<div slot="title" style="position: absolute;right:0px;display: inline-block;width:25%">
									<!-- 数字 -->
									<img src="../../assets/images/system/hot.svg"
									     style="width: 15px;height: 15px;position: absolute;left: -10px;top: calc((100% - 20px)/2);"/>
									<span style="margin: 0 10px;">{{ item.number }}</span>
									<!-- 情感极性 -->


									<a-popover title="" trigger="hover" v-if="flat">
										<a-button type="primary" style="background-color:#ff892a;border:1px solid #ff892a"
										          v-if="emo_polarity[index]=='负面'">
											{{ emo_polarity[index] }}
										</a-button>
										<a-button type="primary" style="background-color:#1ea000;border:1px solid #1ea000"
										          v-if="emo_polarity[index]=='正面'">
											{{ emo_polarity[index] }}
										</a-button>
										<a-button type="primary" style="" v-if="emo_polarity[index]=='中性'">
											{{ emo_polarity[index] }}
										</a-button>
										<template slot="content">
											<p @click="changebuttonzm(index,1)" style="cursor:pointer" v-if="!(emo_polarity[index]=='正面')">
												标注正面</p>
											<p @click="changebuttonzm(index,2)" style="cursor:pointer" v-if="!(emo_polarity[index]=='中性')">
												标注中性</p>
											<p @click="changebuttonzm(index,3)" style="cursor:pointer" v-if="!(emo_polarity[index]=='负面')">
												标注负面</p>
										</template>

									</a-popover>
									<!-- 镜像 -->
									<a target="_blank">
										<img v-if="item.mirrorAddress != null && item.mirrorAddress != ''" title="镜像"
										     src="../../assets/images/system/jingxiang-1.png"
										     @click="jingxiang(item.mirrorAddress)"
										     style="position: relative;top: calc((100% - 15px)/2);margin: 0 5px;padding: 5px 5px;display: inline-block;cursor: pointer;"/>
										<img v-else title="镜像" src="../../assets/images/system/jingxiang-2.png"
										     style="position: relative;top: calc((100% - 15px)/2);margin: 0 5px;padding: 5px 5px;display: inline-block;cursor: pointer;"/>
									</a>
								</div>
							</div>
						</a-list-item-meta>
						<div style="height: 20px;color: black;margin-bottom: 10px;padding-left:16px;">
							<a-col :span="8">
								<a-button v-for="(item2,i) in listLabel[index]"
								          style="margin-right: 5px;color: blue;height: 10%; border: 1px solid #3287FF;background-color: #E7F1FF;color: #2982FF">
									{{ item2.tagsName }}
								</a-button>
							</a-col>
							<a-col :span="8">
								作者： <span :title="item.author">{{ item.author.substring(0, 20) }}</span>
							</a-col>
						</div>
						<div style="height: 20px;color: black;padding-left:16px">
							<a-col :span="8">
								关键词：{{ item.keyword }}
							</a-col>
							<a-col :span="8">
								发布媒体：<span :title="item.informationSources">{{ item.informationSources.substring(0, 20) }}</span>
							</a-col>
							<a-col :span="8">
								发布时间：{{ item.releaseTime }}
							</a-col>
						</div>
					</a-list-item>
				</a-list>
			</a-checkbox-group>
		</div>
		<!-- 镜像模态框 -->
		<a-modal class="modal-box4" v-model="visible5" title="镜像" width="1300px" @ok="hideModal5" ok-text="关闭"
		         style="height:200px" :cancel-button-props="{ style: { display: 'none' } }">

			<div style="overflow: unset;padding: 0px;height:564px">
				<iframe :src="mirrorUrl" style="height: 100%;width: 100%;" name="mirror"></iframe>
			</div>

		</a-modal>
		<a-modal class="modal-box" v-model="visible" title="添加标签" width="500px" @ok="hideModal" ok-text="确定添加"
		         style="height:200px" :cancel-button-props="{ style: { display: 'none' } }">
			<a-row>
				<a-col>
					<a-form-model
							:label-col="{span : 2}"
							:wrapper-col="{span :20}"
							style="padding-bottom:36px"
					>
						<a-form-model-item label="">

							<a-checkbox value="清空标签" :checked="check_delete" style="margin-left: 22%;margin-top: 5%" id="check10"
							            @change="onChange1">
								清空标签
							</a-checkbox>
							<a-checkbox-group @change="onChange" v-model="labelgroup">
								<a-checkbox v-for="(item,i) in tagsList" :value="item.id" style="margin-left: 22%;margin-top: 5%;"
								            v-bind:disabled="check_flag">
									{{ item.name }}
								</a-checkbox>

							</a-checkbox-group>
						</a-form-model-item>
					</a-form-model>
				</a-col>
			</a-row>
		</a-modal>
		<a-modal class="visible1" v-model="visible1" title="添加事件追踪" width="600px" @ok="hideModal1" ok-text="保存"
		         style="height:500px" :cancel-button-props="{ style: { display: 'none' } }">
			<a-row style="padding-left:138px">
				<a-radio-group name="radioGroup" :default-value="1" @change="event_change">
					<a-radio :value="1">
						已有事件
					</a-radio>
					<a-radio :value="2" style="margin-left:20px">
						新建自定义事件
					</a-radio>
				</a-radio-group>
			</a-row>
			<div v-if="exist_event">
				<a-form-model
						:label-col="{span:4 }"
						:wrapper-col="{span:20}"
						style="padding-left:20px;margin-top:15px">

					<a-row :gutter="24" style="margin-left: 0px;">
						<a-col :span="7" v-if="oneEvent" style="padding-left: 0px;width :40%;">
							<div>
								<a-form-model-item label="事件分类" class="add">
									<span style="color:red;margin-left:-87px;margin-right:81px">*</span>
									<a-select placeholder="一级分类" v-model="eventtype_exist_01" style="" @change="oneEventType">
										<a-select-option value="">请选择</a-select-option>
										<a-select-option value="自定义事件">自定义事件</a-select-option>
										<a-select-option :value="item.id" v-for="(item,i) in getOneEventType">
											{{ item.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</div>
						</a-col>

						<a-col :span="7" style="margin-top: 0.3%;padding-left: 0px;width :30%;" v-if="twoEvent">
							<div>
								<a-form-model-item label="" style="width: 140px;">
									<a-select placeholder="二级分类" v-model="eventtype_exist_02" @change="twoEventType">
										<a-select-option value="">请选择</a-select-option>
										<a-select-option :value="item.id" v-for="(item,i) in getTwoEventType">{{ item.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</div>
						</a-col>
						<a-col :span="7" style="margin-top: 0.3%;width :30%;margin-left :-6%;" v-if="threeEvent">
							<div>
								<a-form-model-item label="">
									<a-select placeholder="三级分类" v-model="eventtype_exist_03">
										<a-select-option value="">请选择</a-select-option>
										<a-select-option :value="item.id" v-for="(item,i) in getThreeEventType">{{ item.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</div>
						</a-col>
					</a-row>
				</a-form-model>
				<a-form-model
						:label-col="{span:8 }"
						:wrapper-col="{span:20}"
						style="padding-left:20px"

				>
					<a-row :gutter="24" v-if="EventNameselect">
						<a-col :span="10">
							<div>
								<a-form-model-item label="事件名称" class="add4">
									<span style="color:red;margin-left:-87px;margin-right:81px">*</span>
									<a-select placeholder="请选择" v-model="eventname_exist" style="">
										<a-select-option value="">请选择</a-select-option>
										<a-select-option :value="item.id" v-for="(item,i) in getexiteventtype">{{ item.ruleName }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</div>

						</a-col>
					</a-row>
				</a-form-model>
			</div>
			<div v-if="create_event">
				<a-form-model
						:label-col="{span:8 }"
						:wrapper-col="{span:20}"
						style="padding-left:20px;margin-top:15px">

					<a-row :gutter="24" style="margin-left: 0px;">
						<a-col :span="7" style="padding-left: 0px;width :40%;">
							<div>
								<a-form-model-item label="事件分类" class="add">
									<span style="color:red;margin-left:-87px;margin-right:81px">*</span>
									<a-select v-model="eventtype_create_01" style="" @change="oneEventType2">
										<a-select-option value="">请选择</a-select-option>
										<a-select-option :value="item.id" v-for="(item,i) in getOneEventType_create">
											{{ item.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</div>
						</a-col>

						<a-col :span="7" style="margin-top: 0.3%;padding-left: 0px;width :30%;">
							<div>
								<a-form-model-item label="" style="width: 140px;">
									<a-select v-model="eventtype_create_02" @change="twoEventType2">
										<a-select-option value="">请选择</a-select-option>
										<a-select-option :value="item.id" v-for="(item,i) in getTwoEventType_create">{{ item.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</div>
						</a-col>
						<a-col :span="7" style="margin-top: 0.3%;width :30%;margin-left :-6%;">
							<div>
								<a-form-model-item label="">
									<a-select v-model="eventtype_create_03">
										<a-select-option value="">请选择</a-select-option>
										<a-select-option :value="item.id" v-for="(item,i) in getThreeEventType_create">{{ item.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</div>
						</a-col>

					</a-row>
				</a-form-model>
				<a-form-model
						:label-col="{span:8 }"
						:wrapper-col="{span:20}"
						style="padding-left:20px"

				>
					<a-row :gutter="24">
						<a-col :span="10">
							<div>

								<a-form-model-item label="事件名称" class="add4">
									<span style="color:red;margin-left:-87px;margin-right:81px">*</span>
									<a-input placeholder="请输入名称" v-model="eventname_create"/>
								</a-form-model-item>
							</div>
						</a-col>
					</a-row>
				</a-form-model>
				<a-form-model
						:label-col="{span:8 }"
						:wrapper-col="{span:20}"
						style="padding-left:22px">

					<a-row :gutter="24">
						<a-col :span="10">
							<div>
								<a-form-model-item label="可见性" class="add2">
									<a-radio-group name="radioGroup" v-model="isShow">
										<a-radio :value="1">
											系统
										</a-radio>
										<a-radio :value="2">
											仅自己
										</a-radio>

									</a-radio-group>
								</a-form-model-item>
							</div>
						</a-col>
					</a-row>
				</a-form-model>
			</div>
		</a-modal>

		<a-modal class="modal-box2" v-model="visible3" :key="num" title="添加快报" width="720px" @ok="hideModal3"
		         ok-text="确定保存" style="height:300px" :cancel-button-props="{ style: { display: 'none' } }">
			<div style="height:600px;overflow-y:auto">
				<a-row>
					<a-form-model
							ref="ruleForm"
							:model="form"
							:rules="rules"
							:label-col="labelCol1"
							:wrapper-col="wrapperCol1"
					>

						<a-form-model-item ref="eventTitle" label="事件标题" prop="eventTitle">
							<a-input
									v-model="form.eventTitle"
									@blur="() => {$refs.name.onFieldBlur();}"
							/>
						</a-form-model-item>

						<a-row>
							<a-col :span="12">
								<a-form-model-item label="报告时间:" required prop="submittedTime" style="margin-left:20px">
									<a-date-picker show-time v-model="form.submittedTime" format="YYYY-MM-DD HH:mm:ss"
									               placeholder="请选择" style="width: 73%;margin-left:20px">
									</a-date-picker>

								</a-form-model-item>
							</a-col>
							<a-col :span="12">
								<a-form-model-item label="发布时间:" prop="releaseTime">
									<a-date-picker show-time v-model="form.releaseTime" format="YYYY-MM-DD HH:mm:ss" placeholder="请选择"
									               style="width: 73%;margin-left:20px">
									</a-date-picker>

								</a-form-model-item>
							</a-col>
						</a-row>
						<a-row style="margin-left:22px">
							<a-col :span="11">
								<a-form-model-item label="媒体类型" prop="mediaTypeId">
									<a-select v-model="form.mediaTypeId" placeholder="请选择" class="eventtype">
										<a-select-option :value="item.id" v-for="(item,i) in media_type">
											{{ item.mediaName }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>
						</a-row>
						<a-form-model-item ref="name" label="发布媒体" prop="informationSources">
							<a-input
									v-model="form.informationSources"
									@blur="() => {$refs.name.onFieldBlur();}"
							/>
						</a-form-model-item>
						<a-form-model-item label="事件等级" prop="levelInference">
							<a-select v-model="form.levelInference" placeholder="请选择">
								<a-select-option value="3">
									重大
								</a-select-option>
								<a-select-option value="2">
									中等
								</a-select-option>
								<a-select-option value="1">
									一般
								</a-select-option>
							</a-select>
						</a-form-model-item>

						<a-row style="margin-left:22px">
							<a-col :span="11">

								<a-form-model-item label="事件分类" prop="oneEventType">
									<a-select v-model="form.oneEventType" placeholder="请选择" class="eventtype" @change="event_classify">
										<a-select-option :value="item.id" v-for="(item,i) in getonetype">
											{{ item.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>
							<a-col :span="6">
								<a-form-model-item label="">
									<a-select v-model="form.twoEventType" placeholder="请选择" class="eventtype1"
									          @change="event_classify1">
										<a-select-option :value="item.id" v-for="(item,key) in gettwotype">
											{{ item.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>
							<a-col :span="6">
								<a-form-model-item label="">
									<a-select v-model="form.threeEventType" placeholder="请选择" class="eventtype2">
										<a-select-option :value="index.id" v-for="(index,key) in getthreetype">
											{{ index.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>

						</a-row>
						<a-form-model-item ref="name" label="关键词" prop="keyword">
							<a-input
									v-model="form.keyword"
									@blur="() => {$refs.name.onFieldBlur();}"
							/>
						</a-form-model-item>

						<a-form-model-item label="内容简介" prop="content">
							<a-input v-model="form.content" type="textarea"/>
						</a-form-model-item>
						<a-form-model-item ref="name" label="原文链接" prop="url">
							<a-input
									v-model="form.url"
									@blur="() => {$refs.name.onFieldBlur();}"
							/>
						</a-form-model-item>
						<a-form-model-item ref="name" label="原文标题" prop="title">
							<a-input
									v-model="form.title"
									@blur="() => {$refs.name.onFieldBlur();}"
							/>
						</a-form-model-item>
						<a-row>
							<a-col :span="13">
								<a-form-model-item label="移动相关" prop="mobile" style="margin-left:25px">
									<a-select v-model="form.mobile" placeholder="请选择" class="eventtype">
										<a-select-option value="1">
											是
										</a-select-option>
										<a-select-option value="2">
											否
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>
							<a-col :span="11">
								<a-form-model-item label="业务影响" prop="businessImpact">
									<a-select v-model="form.businessImpact" placeholder="请选择" class="eventtype3">
										<a-select-option :value="item.id" v-for="(item,i) in getBusinessImpact">
											{{ item.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>
						</a-row>
						<a-row style="margin-left:22px">
							<a-col :span="12">

								<a-form-model-item label="省份">
									<a-select v-model="form.province" placeholder="请选择" class="eventtype">
										<a-select-option :value="item.name" v-for="(item,i) in getprovice">
											{{ item.name }}
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>

							<a-col :span="12" style="padding-left: 2.5%;">
								<a-form-model-item label="情感极性" prop="emotionalAcute">
									<a-select v-model="form.emotionalAcute" placeholder="请选择" class="eventtype3">
										<a-select-option :value="1">
											正面
										</a-select-option>
										<a-select-option :value="2">
											中性
										</a-select-option>
										<a-select-option :value="3">
											负面
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>
						</a-row>
						<a-row>
							<a-form-model-item label="关联部门" prop="relatedepart" class="checkboxs">
								<div style="z-index: 999; padding-left:5px;background-color:#ebf3fe"><span>信安中心</span>
									<img src="../../assets/images/generalDetection/28.jpg" :style="xazx_c?'':'display:none'" alt=""
									     style="cursor: pointer;height: 18px;float:right;margin-top:5px;margin-right:10px"
									     @click="showxazx">
									<img src="../../assets/images/generalDetection/27.jpg" :style="xazx_c?'display:none':''" alt=""
									     style="cursor: pointer;height: 18px;float:right;margin-top:5px;margin-right:10px"
									     @click="showxazx">
								</div>
								<a-checkbox-group v-model="form.departmentList1" v-if="xazx_c">
									<div>
										<a-checkbox :value="item.id" name="type" v-for="(item,i) in getDepartment_xazx">{{ item.name }}
										</a-checkbox>
									</div>

								</a-checkbox-group>
								<div style="z-index:999; padding-left:5px;background-color:#ebf3fe"><span>集团</span>

									<img src="../../assets/images/generalDetection/28.jpg" alt=""
									     style="cursor: pointer;height: 18px;float:right;margin-top:5px;margin-right:10px"
									     :style="jt_c?'display:block':'display:none'" @click="showjt">
									<img src="../../assets/images/generalDetection/27.jpg" alt=""
									     style="cursor: pointer;height: 18px;float:right;margin-top:5px;margin-right:10px"
									     :style="jt_c?'display:none':'display:block'" @click="showjt"></div>
								<a-checkbox-group v-model="form.departmentList2" v-if="jt_c">
									<div>
										<a-checkbox :value="item.id" name="type" v-for="(item,i) in getDepartment_jt">{{ item.name }}
										</a-checkbox>
									</div>
								</a-checkbox-group>
								<div style="z-index: 999;padding-left:5px;background-color:#ebf3fe"><span>省公司</span>
									<img src="../../assets/images/generalDetection/28.jpg" :style="sgs_c?'display:block':'display:none'"
									     alt="" style="cursor: pointer;height: 18px;float:right;margin-top:5px;margin-right:10px"
									     @click="showsgs">
									<img src="../../assets/images/generalDetection/27.jpg" :style="sgs_c?'display:none':'display:block'"
									     alt="" style="cursor: pointer;height: 18px;float:right;margin-top:5px;margin-right:10px"
									     @click="showsgs">
								</div>
								<a-checkbox-group v-model="form.departmentList3" v-if="sgs_c">
									<a-checkbox :value="item.id" name="type" v-for="(item,i) in getDepartment_sgs">{{ item.name }}
									</a-checkbox>
								</a-checkbox-group>
								<div style="z-index: 999;padding-left:5px;background-color:#ebf3fe"><span>专业公司</span>
									<img src="../../assets/images/generalDetection/28.jpg" :style="zygs_c?'':'display:none'" alt=""
									     style="cursor: pointer;height: 18px;float:right;margin-top:5px;margin-right:10px"
									     @click="showzygs">
									<img src="../../assets/images/generalDetection/27.jpg" :style="zygs_c?'display:none':''" alt=""
									     style="cursor: pointer;height: 18px;float:right;margin-top:5px;margin-right:10px"
									     @click="showzygs"></div>
								<a-checkbox-group v-model="form.departmentList4" v-if="zygs_c">
									<a-checkbox :value="item.id" name="type" v-for="(item,i) in getDepartment_zygs">{{ item.name }}
									</a-checkbox>
								</a-checkbox-group>

								<div style="z-index: 999;padding-left:5px;background-color:#ebf3fe"><span>其他</span>
									<img src="../../assets/images/generalDetection/28.jpg" :style="qt_c?'display:block':'display:none'"
									     alt="" style="cursor: pointer;height: 18px;float:right;margin-top:5px;margin-right:10px"
									     @click="showqt">
									<img src="../../assets/images/generalDetection/27.jpg" :style="qt_c?'display:none':'display:block'"
									     alt="" style="cursor: pointer;height: 18px;float:right;margin-top:5px;margin-right:10px"
									     @click="showqt">
								</div>
								<a-checkbox-group v-model="form.departmentList5" v-if="qt_c">
									<a-checkbox :value="item.id" name="type" v-for="(item,i) in getDepartment_qt">{{ item.name }}
									</a-checkbox>
								</a-checkbox-group>

							</a-form-model-item>
						</a-row>
						<a-row>
							<a-col :span="15">
								<a-form-model-item label="是否热搜" prop="hot" style="margin-left:24px" class="eventtype4">
									<a-select v-model="form.hot" placeholder="" @change="ifresou">
										<a-select-option value="1">
											是
										</a-select-option>
										<a-select-option value="2">
											否
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>
						</a-row>
						<a-row v-show="resou_event">
							<a-col :span="13">
								<a-form-model-item ref="searchlist" label="热搜榜" prop="searchlist" style="margin-left:25px">
									<a-input style="margin-left :20px;width:180px"
									         v-model="form.searchlist"
									         @blur="() => {$refs.name.onFieldBlur();}"
									/>
								</a-form-model-item>

							</a-col>
							<a-col :span="11">
								<a-form-model-item ref="hotRanking" label="热搜名次" prop="searchrank" style="margin-left:15px">
									<a-input style="margin-left:20px;width:180px"
									         v-model="form.hotRanking"
									         @blur="() => {$refs.name.onFieldBlur();}"
									/>
								</a-form-model-item>

							</a-col>
						</a-row>
						<a-row>
							<a-col :span="15">
								<a-form-model-item label="是否诈骗" prop="fraud" style="margin-left:24px" class="eventtype4">
									<a-select v-model="form.fraud" placeholder="" @change="if_zhapian" default-value="1">
										<a-select-option value="1">
											是
										</a-select-option>
										<a-select-option value="2">
											否
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>
						</a-row>
						<a-row v-show="zhapian_option">
							<a-col :span="24">
								<a-form-model-item label="诈骗事件" prop="zp_event" style="" class="checkboxs">
									<a-checkbox-group v-model="form.fraudEvent">
										<a-checkbox value="1" name="type">网络电信诈骗</a-checkbox>
										<a-checkbox value="2" name="type">兼职诈骗</a-checkbox>
										<a-checkbox value="3" name="type">刷单诈骗</a-checkbox>
										<a-checkbox value="4" name="type">游戏诈骗</a-checkbox>
										<a-checkbox value="5" name="type">新冠诈骗</a-checkbox>
										<a-checkbox value="6" name="type">投资诈骗</a-checkbox>
										<a-checkbox value="7" name="type">考试诈骗</a-checkbox>
										<a-checkbox value="8" name="type">社保诈骗</a-checkbox>
										<a-checkbox value="9" name="type">ETC诈骗</a-checkbox>
										<a-checkbox value="10" name="type">银行(卡)诈骗</a-checkbox>
										<a-checkbox value="11" name="type">快递诈骗</a-checkbox>
									</a-checkbox-group>
								</a-form-model-item>
							</a-col>
						</a-row>
						<a-row>
							<a-col :span="15">
								<a-form-model-item label="是否漏洞" prop="hole" style="margin-left:24px" class="eventtype4">
									<a-select v-model="form.hole" placeholder="" @change="if_loudong">
										<a-select-option value="1">
											是
										</a-select-option>
										<a-select-option value="2">
											否
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>
						</a-row>
						<a-row v-if="loudong_option">
							<a-col :span="24">
								<a-form-model-item label="漏洞事件" style="" class="checkboxs">
									<a-checkbox-group v-model="form.holeEvent">
										<a-checkbox value="1" name="type">国家安全漏洞库</a-checkbox>
										<a-checkbox value="2" name="type">网络漏洞</a-checkbox>
									</a-checkbox-group>
								</a-form-model-item>
							</a-col>
						</a-row>

						<a-row>
							<a-col :span="15">
								<a-form-model-item label="漏洞库" style="margin-left:25px" prop="holeLibrary" class="eventtype4">
									<a-select v-model="form.holeLibrary" placeholder="" @change="loudongku">
										<a-select-option value="1">
											是
										</a-select-option>
										<a-select-option value="2">
											否
										</a-select-option>
									</a-select>
								</a-form-model-item>
							</a-col>

						</a-row>

						<a-row v-if="loudongku_event">
							<a-col :span="12">
								<a-form-model-item label="漏洞公开日期" required style="margin-left:25px">
									<a-date-picker
											v-model="form.holePublicTime"
											show-time
											type="date"
											placeholder="请选择"
											style="width: 65%;margin-left:15px"
									/>
								</a-form-model-item>
							</a-col>
							<a-col :span="11">
								<a-form-model-item ref="cveId" label="CVE ID" prop="CVEID">
									<a-input style="margin-left:30px;width:180px"
									         v-model="form.cveId"
									         @blur="() => {$refs.name.onFieldBlur();}"
									/>
								</a-form-model-item>
							</a-col>
						</a-row>
					</a-form-model>
				</a-row>
			</div>
		</a-modal>
		<div class="right-content" v-show="change==2">
			<Statistics v-bind:commandIds="commandIds"></Statistics>
		</div>
	</a-layout-content>
	<Info v-else-if="ifshow_info" v-bind:ruleNames="ruleNames" v-bind:detail_id="detial_id" v-bind:commandIds="commandIds"
	      @gohome="gohome"></Info>
</template>

<script>

import left from './left/index'
import rightTop from './right/top'
import '@/utils/wordCloud'
import echarts from "echarts";
import {
	addEventAnalyze,
	addFastReport,
	afterFastReport,
	deleteList,
	editDataTags,
	editDingyue,
	editlevel,
	editTuisong,
	emotion,
	event_detail,
	generalist,
	getBusinessImpact,
	getDepartment,
	getExistEvent,
	getOneEventType,
	getOneEventType_kuaibao,
	getprovice,
	getThreeEventType,
	getthreeEventType_kuaibao,
	getTwoEventType,
	gettwoEventType_kuaibao
} from "@/api/generalDetection/generalDetetion";
import {getMediaTypeList} from "@/api/generalDetection/generalDetetionResults";
import moment from 'moment'
import info from '@/views/generalDetection/generalDetectionInfo.vue'
import Statistics from '@/views/generalDetection/generalDetectionStatistics.vue'
import {export2Excel} from "@/utils/exportExcel";

const CubeLeft = echarts.graphic.extendShape({
	shape: {
		x: 0,
		y: 0
	},
	buildPath: function (ctx, shape) {
		const xAxisPoint = shape.xAxisPoint
		const c0 = [shape.x, shape.y]
		const c1 = [shape.x - 9, shape.y - 9]
		const c2 = [xAxisPoint[0] - 9, xAxisPoint[1] - 9]
		const c3 = [xAxisPoint[0], xAxisPoint[1]]
		ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath()
	}
})
const CubeRight = echarts.graphic.extendShape({
	shape: {
		x: 0,
		y: 0
	},
	buildPath: function (ctx, shape) {
		const xAxisPoint = shape.xAxisPoint
		const c1 = [shape.x, shape.y]
		const c2 = [xAxisPoint[0], xAxisPoint[1]]
		const c3 = [xAxisPoint[0] + 18, xAxisPoint[1] - 9]
		const c4 = [shape.x + 18, shape.y - 9]
		ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath()
	}
})
const CubeTop = echarts.graphic.extendShape({
	shape: {
		x: 0,
		y: 0
	},
	buildPath: function (ctx, shape) {
		const c1 = [shape.x, shape.y]
		const c2 = [shape.x + 18, shape.y - 9]
		const c3 = [shape.x + 9, shape.y - 18]
		const c4 = [shape.x - 9, shape.y - 9]
		ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath()
	}
})
echarts.graphic.registerShape('CubeLeft', CubeLeft)
echarts.graphic.registerShape('CubeRight', CubeRight)
echarts.graphic.registerShape('CubeTop', CubeTop)
const MAX = [6000, 6000, 6000, 6000, 6000, 5000, 4000, 3000, 2000, 4000, 3000, 2000]
const VALUE = [2012, 1230, 3790, 2349, 1654, 1230, 3790, 2349, 1654, 3790, 2349, 1654]


export default {
	name: "generalDetection_1",
	components: {
		left,
		rightTop,
		Info: info,
		Statistics: Statistics
	},
	data() {
		return {
			num: Math.random(),
			mirrorUrl: '',
			visible5: false,
			sentimentfx_zm: undefined,//情感分析——正面
			sentimentfx_fm: undefined,//情感分析——负面
			sentimentfx_zx: undefined,//情感分析——中性
			yqtrend_x: [],//舆情情感趋势x轴
			yqtrend_y: [],//舆情情感趋势y轴
			yqtrend_y1: [],//舆情情感趋势y轴
			yqtrend_y2: [],//舆情情感趋势y轴
			letters_x: [],//统计分析快报折线图x
			letters_y: [],//统计分析快报折线图y
			check_delete: false,//清空
			getprovice: [], //省份
			hidden1: true,
			hidden2: true,
			hidden3: true,
			hidden4: true,
			hidden5: true,
			labelgroup: [],
			ruleNames: undefined,
			esids: '',
			listLabel: [],
			user: (JSON.parse(localStorage.getItem('user')) ? JSON.parse(localStorage.getItem('user')) : {
				'realName': "***"
			}),// 当前用户信息
			moment,
			flagTime: true, // 判断排序
			imageRecognition: "0",//图片识别
			tagsList: [],//标签的数组
			getonetype: [],//快报——第一级别
			gettwotype: [],//快报_第二类别
			getthreetype: [],//快报-第三类别
			getDepartment_xazx: [],//信安中心
			getDepartment_jt: [],//集团
			getDepartment_sgs: [],//省公司
			getDepartment_zygs: [],//专业公司
			getDepartment_qt: [],//其他
			getBusinessImpact: [],//业务影响接口
			detial_id: undefined,
			ifshow_list: true,
			ifshow_info: false,
			fast: {},
			detail_value: {},
			isShow: 1,
			eventname_create: '',
			eventname_exist: '',
			eventtype_create_01: '',
			eventtype_create_02: '',
			eventtype_create_03: '',
			eventtype_exist_01: '',
			eventtype_exist_02: '',
			eventtype_exist_03: '',
			create_event: false,//是否新建自定义事件
			exist_event: true,//是否已存在事件
			EventNameInput: true,
			EventNameselect: true,
			oneEvent: true,
			twoEvent: true,
			threeEvent: true,
			getOneEventType: [],//获取一级菜单
			getOneEventType_create: [],
			getTwoEventType: [],//获取二级菜单
			getTwoEventType_create: [],
			getThreeEventType: [],//获取三级菜单
			getThreeEventType_create: [],
			getexiteventtype: [],//已有自定义事件名称
			text: '',
			query: {
				content: '',
				title: '',
				author: '',
				levelInference: '',
				keyword: '',
				informationSources: '',
				emotionalPolarity: "0",
				reportFlag: '0',
				releaseTime: [],
				label: "0",
				startReleaseTime: undefined,
				endReleaseTime: undefined,
				weightStart: null,
				weightEnd: null
			},

			AllCheckmedia: false,
			option_media: [],
			checkedList_media: [],
			checkedList_media2: [],
			checkedList_mediaId: [], // 收集媒体类型id
			indeterminate1: false,
			checkAll_media: false,
			commandIds: undefined,
			idList: [],
			isDingyue: [],
			isTuisong: [],
			ifDingyue: [],
			ifTuisong: [],
			event_name: false,
			xazx_c: true,
			jt_c: true,
			sgs_c: true,
			zygs_c: true,
			qt_c: true,
			lableList: [],
			labelsData: [],
			title: '',
			media_type: [],
			media_type2: [],
			emo_polarity: [],
			check_flag: false,
			select_flag: false,
			flat: 1,
			checkedList: [],
			visible: false,
			visible1: false,
			visible2: false,
			visible3: false,
			addanalysis: undefined,
			addanalysisname: undefined,
			zhapian_option: false,
			loudong_option: false,
			resou_event: false,
			loudongku_event: false,
			one_classify: [],
			two_classify: [],
			three_classfy: [],
			//nametype:undefined,
			form: {
				id: 0,
				eventTitle: "",
				submittedTime: [],
				endSubmittedTime: "",
				startSubmittedTime: "",
				releaseTime: "",
				endReleaseTime: "",
				startReleaseTime: "",
				informationSources: "",
				mediaTypeId: "",
				levelInference: undefined,
				oneEventType: undefined,
				twoEventType: undefined,
				threeEventType: undefined,
				keyword: "",
				content: "",
				url: "",
				title: "",
				esId: undefined,
				userId: undefined,
				emotionalAcute: undefined,
				mobile: undefined,
				businessImpact: undefined,
				businessImpactName: "",
				province: "",
				city: "",
				county: "",
				hot: undefined,
				hotRanking: undefined,
				hotBang: '',//热搜榜
				fraudEvent: '',
				fraud: undefined,
				hole: undefined,
				holeEvent: "",
				holeLibrary: undefined,
				holePublicTime: [],
				cveId: "",
				createTime: "",
				flag: undefined,
				departmentId: undefined,
				departmentList1: [],
				departmentList2: [],
				departmentList3: [],
				departmentList4: [],
				departmentList5: [],
				departmentList: [
					{
						id: undefined,
						category: "",
						name: ""
					}
				]


			},
			collspanQuery: true,
			rules: {
				eventTitle: [
					{required: true, message: '请输入事件名称', trigger: 'blur'},
				],

				informationSources: [
					{required: true, message: '请输入发布媒体', trigger: 'blur'},
				],
				keyword: [
					{required: true, message: '请输入关键词', trigger: 'blur'},
				],
				content: [
					{required: true, message: '请输入内容简介', trigger: 'blur'},
				],
				url: [
					{required: true, message: '请输入原始链接', trigger: 'blur'},
				],
				title: [
					{required: true, message: '请输入原文标题', trigger: 'blur'},
				],
				cveId: [
					{required: true, message: '请输入事件名称', trigger: 'blur'},
				],
				hotRanking: [
					{required: true, message: '请输入热搜名次', trigger: 'blur'},
				],
				origintitle: [
					{required: true, message: '请输入事件名称', trigger: 'blur'},
				],

				startSubmittedTime: [{required: true, message: '请选择', trigger: 'change'}],
				submittedTime: [{required: true, message: '请选择', trigger: 'change'}],
				endSubmittedTime: [{required: true, message: '请选择', trigger: 'change'}],
				releaseTime: [{required: true, message: '请选择', trigger: 'change'}],
				endReleaseTime: [{required: true, message: '请选择', trigger: 'change'}],
				startReleaseTime: [{required: true, message: '请选择', trigger: 'change'}],
				levelInference: [{required: true, message: '请选择', trigger: 'change'}],
				oneEventType: [{required: true, message: '请选择', trigger: 'change'}],
				twoEventType: [{required: true, message: '请选择', trigger: 'change'}],
				threeEventType: [{required: true, message: '请选择', trigger: 'change'}],
				mobile: [{required: true, message: '请选择', trigger: 'change'}],
				businessImpact: [{required: true, message: '请选择', trigger: 'change'}],
				mediaTypeId: [{required: true, message: '请选择', trigger: 'change'}],
				emotionalAcute: [{required: true, message: '请选择', trigger: 'change'}],
				province: [{required: true, message: '请选择', trigger: 'change'}],
				hot: [{required: true, message: '请选择', trigger: 'change'}],
				holeLibrary: [{required: true, message: '请选择', trigger: 'change'}],
				hole: [{required: true, message: '请选择', trigger: 'change'}],
				holeEvent: [{required: true, message: '请选择', trigger: 'change'}],
				fraud: [{required: true, message: '请选择', trigger: 'change'}],
				relatedepart: [
					{
						type: 'array',
						required: true,
						message: 'Please select at least one activity type',
						trigger: 'change',
					},
				],
				resource: [
					{required: true, message: 'Please select activity resource', trigger: 'change'},
				],
				desc: [{required: true, message: 'Please input activity form', trigger: 'blur'}],
			},
			labelCol1: {span: 4},
			wrapperCol1: {span: 18},
			change: 1,
			listData: [],
			color: "#8674FF",
			changebuttonSelectStyle: '全部',
			middle_value: '全部',
			pagingFlag: undefined,//判断是不是点击的分页
			pagination: {
				current: 1,
				pageSize: 10,
				showSizeChanger: true,
				total: 0,
				showQuickJumper: true,
				showTotal: total => `共 ${total} 条`,
				pageSizeOptions: ["10", "20", "50", "100"],//每页中显示的数据
				onChange: (current, pageSize) => {
					this.pagination.current = current;
					this.pagination.pageSize = pageSize;
					this.pagingFlag = 1;
					/*this.refreshList();*/
					this.queryInfomationData()
				},
				onShowSizeChange: (current, pageSize) => {
					this.pagination.pageSize = pageSize;
					this.pagingFlag = 1;
					this.queryInfomationData()
				},
			},
			labelCol: {span: 10},
			wrapperCol: {span: 14},
			form1: {
				title: '',
				domain: '通用事件',
				classification: '全部',
				mediaType: 1,
				sampletype: '',
			},
			orderBy: false,
			mediaFlag: 1,
			mediaStyle: 'primary',
			collspanMedia: true,
			indeterminate: false,
			checkAll: false,
			total: 0,
			label: '',
			labels: '',
			labels2: '',
			detailsIf: 0,
			myChartBottomLine: undefined,
			myChartMediaBar: undefined,
			myChartScatter: undefined,
			myChartPie: undefined,
			dataLevelLine1: [12, 80, 79, 27, 99, 43, 33],
			dataLevelLine2: [11, 76, 94, 23, 29, 77, 53],
			dataLevelLine3: [67, 62, 65, 35, 44, 69, 52],
			dataLevelDate: [],
			queryFlag: false, // 判断全文查询还是标题查询
			orderType: 2, // 根据时间排序是升序还是降序
		}
	},

	watch: {
		commandId(n, o) { //n为新值,o为旧值;
			this.commandIds = n;
			this.ifshow_info = false;
			this.ifshow_list = true;
			this.refreshList();
			this.checkAll = false;
			this.checkedList = []
		},
		ruleName(n, o) { //n为新值,o为旧值;
			this.ruleNames = n;
			this.query.title = ''
			this.query.content = ''
			this.query.emotionalPolarity = "0"
			this.query.keyword = ''
			this.query.levelInference = ""
			this.query.informationSources = ''
			this.imageRecognition = '0'
			this.query.releaseTime = ''
			this.query.label = "0"
			this.query.reportFlag = '0'
			this.query.author = ''
			this.query.endReleaseTime = ''
			this.query.startReleaseTime = ''
			// this.refreshList()
			this.checkedList_media.splice(0);
			this.checkedList_media2.splice(0);
			this.checkedList_mediaId.splice(0);
		},
		rulename2(n, o) {
			this.ruleNames = n;
		},
	},

	props: ['commandId', 'ruleName', 'commandId2', 'rulename2'],
	methods: {
		hideModal5() {
			this.visible5 = false
		},

		jingxiang(url) {
			console.log(url);
			this.mirrorUrl = url;
			this.visible5 = true;

		},
		reset() {
			this.query.content = ''
			this.query.title = ''
			this.query.emotionalPolarity = "0"
			this.query.keyword = ''
			this.query.levelInference = ""
			this.query.informationSources = ''
			this.query.mediaTypeId = ''
			this.imageRecognition = '0'
			this.query.releaseTime = ''
			this.query.label = "0"
			this.query.reportFlag = '0'
			this.query.author = ''
			this.query.endReleaseTime = ''
			this.query.startReleaseTime = ''
			// this.refreshList()
			this.checkedList_media.splice(0);
			this.checkedList_media2.splice(0);
			this.checkedList_mediaId.splice(0);
			this.text = '';
		},
		gohome(val) {
			this.ifshow_info = val
			this.ifshow_list = true
		},

		/**
		 * 控制快报统计趋势隐藏显示
		 */
		showHidden1() {
			this.hidden1 = !this.hidden1
		},
		/**
		 * 控制舆情情感趋势隐藏显示
		 */
		showHidden2() {
			this.hidden2 = !this.hidden2
		},
		/**
		 * 控制舆情情感趋势隐藏显示
		 */
		showHidden3() {
			this.hidden3 = !this.hidden3
		},
		/**
		 * 控制热词词云隐藏显示
		 */
		showHidden4() {
			this.hidden4 = !this.hidden4
		},
		/**
		 * 控制热词分布趋势隐藏显示
		 */
		showHidden5() {
			this.hidden5 = !this.hidden5
		},
		/**
		 *  判断是全文查询 还是标题查询
		 */
		if_query(value) {
			if (value == 1) {
				this.queryFlag = false;
			}
			if (value == 2) {
				this.queryFlag = true;
			}
		},
		hideModal1() {
			if (this.checkedList.length == 0) {
				this.$message.error('请选择记录');
			} else {
				if (this.exist_event) {
					if (this.eventtype_exist_01 == '' || this.eventtype_exist_01 == undefined || this.eventtype_exist_01 == null) {
						this.$message.error('请选择已有事件的事件分类');
					}
					if (this.eventtype_exist_01 == '自定义事件') {
						if (this.eventname_exist == '' || this.eventname_exist == undefined || this.eventname_exist == null) {
							this.$message.error('请选择已有事件的事件名称');
						}
						let params = {
							commandId: this.commandIds,
							idList: this.checkedList,
							eventId: this.eventname_exist,
							type: 1,
							eventName: "",
							oneEventType: 0,
							twoEventType: 0,
							threeEventType: 0,
							isShow: 0
						}
						addEventAnalyze(
								params
						).then(res => {
							if (res.data) {
								this.$message.success('添加成功');
								this.visible1 = false;
								this.refreshList()
							}
						})
					} else {
						let params = {
							commandId: this.commandIds,
							idList: this.checkedList,
							type: 2,
							eventName: "",
							oneEventType: this.eventtype_exist_01,
							twoEventType: this.eventtype_exist_02,
							threeEventType: this.eventtype_exist_03,
							isShow: 0
						}
						addEventAnalyze(
								params
						).then(res => {
							if (res.data = "success") {
								this.$message.success('添加成功');
								this.visible1 = false;
							}
						})
					}

				}
				if (this.create_event) {
					if (this.eventname_create == '' || this.eventname_create == undefined || this.eventname_create == null) {
						this.$message.error('请输入新建自定义事件的事件名称');
					}
					if (this.eventtype_create_01 == '' || this.eventtype_create_01 == undefined || this.eventtype_create_01 == null) {
						this.$message.error('请选择新建自定义事件的事件分类');
					}
					let params = {
						commandId: this.commandIds,
						idList: this.checkedList,
						type: 3,
						eventName: this.eventname_create,
						oneEventType: this.eventtype_create_01,
						twoEventType: this.eventtype_create_02,
						threeEventType: this.eventtype_create_03,
						isShow: this.isShow
					}
					addEventAnalyze(
							params
					).then(res => {
						if (res.data = "success") {
							this.$message.success('添加成功');
							this.visible1 = false;
						}
					})
				}
			}

		},
		event_change(value) {
			if (value.target.value == 1) {
				this.exist_event = true;
				this.create_event = false;
				if (this.eventtype_exist_01 == '自定义事件') {
					this.twoEvent = false;
					this.threeEvent = false;
					this.EventNameselect = true;
					getExistEvent().then(res => {
						this.getexiteventtype = res.data
					})
				}
			}
			if (value.target.value == 2) {
				this.exist_event = false;
				this.create_event = true;
			}

		},
		twoEventType(e) {
			this.eventtype_exist_03 = ''
			this.getThreeEventType = []
			let param = {
				twoEventType: e,
			}
			getThreeEventType(
					param
			).then(res => {
				this.getThreeEventType = res.data
			})
		},
		twoEventType2(e) {
			this.eventtype_create_03 = ''
			this.getThreeEventType_create = []
			let param = {
				twoEventType: e,
			}
			getThreeEventType(
					param
			).then(res => {
				this.getThreeEventType_create = res.data
			})
		},
		oneEventType(e) {//一级分类
			this.eventtype_exist_02 = ''
			this.getexiteventtype = []
			this.getTwoEventType = []
			console.log(e)
			if (e == '自定义事件') {
				this.twoEvent = false;
				this.threeEvent = false;
				this.EventNameselect = true;
				getExistEvent().then(res => {
					this.getexiteventtype = res.data
				})
			} else {
				this.twoEvent = true;
				this.threeEvent = true;
				this.EventNameselect = false;
				let param = {
					oneEventType: e,
				}
				getTwoEventType(
						param
				).then(res => {
					this.getTwoEventType = res.data
				})
			}
		},
		oneEventType2(e) {//一级分类
			this.eventtype_create_02 = ''
			this.getTwoEventType_create = []
			console.log(e)
			this.twoEvent = true;
			this.threeEvent = true;
			this.EventNameselect = false;
			let param = {
				oneEventType: e,
			}
			getTwoEventType(
					param
			).then(res => {
				this.getTwoEventType_create = res.data
			})

		},
		onCheckAllChange_media(e) {
			this.AllCheckmedia = !this.AllCheckmedia
			if (this.AllCheckmedia) {
				this.media_type.forEach((item, i) => {
					if (i < 8) {
						this.checkedList_media.push(item.mediaName)
					}
				})
				this.media_type.forEach((item, i) => {
					if (i >= 8) {
						this.checkedList_media2.push(item.mediaName)
					}
				})
			} else {
				this.checkedList_media.splice(0)
				this.checkedList_media2.splice(0)
			}
		},
		onChange_media(checkedValues) {
			this.checkedList_media = [];
			this.checkedList_mediaId = [];
			this.checkedList_media = checkedValues;
			if (this.media_type.length === (this.checkedList_media.length + this.checkedList_media2.length)) {
				this.AllCheckmedia = true;
			} else {
				this.AllCheckmedia = false;
			}
		},
		onChange_media1(checkedValues) {
			this.checkedList_media2 = [];
			this.checkedList_mediaId = [];
			this.checkedList_media2 = checkedValues;
			if (this.media_type.length === (this.checkedList_media.length + this.checkedList_media2.length)) {
				this.AllCheckmedia = true;
			} else {
				this.AllCheckmedia = false;
			}
		},


		showxazx() {
			this.xazx_c = !this.xazx_c
		},
		showjt() {
			console.log(1)
			this.jt_c = !this.jt_c
		},
		showsgs() {
			this.sgs_c = !this.sgs_c
		},
		showzygs() {
			this.zygs_c = !this.zygs_c
		},
		showqt() {
			this.qt_c = !this.qt_c
		},
		if_zhapian(value) {
			console.log(`selected ${value}`);
			if (value == 1) {
				this.zhapian_option = true;
			}
			if (value == 2) {
				this.zhapian_option = false
			}
		},
		if_loudong(value) {
			console.log(`selected ${value}`);
			if (value == 1) {
				this.loudong_option = true;
			}
			if (value == 2) {
				this.loudong_option = false
			}
		},
		ifresou(value) {
			console.log(`selected ${value}`);
			if (value == 1) {
				this.resou_event = true;
			}
			if (value == 2) {
				this.resou_event = false;
			}
		},
		loudongku(value) {
			if (value == 1) {
				this.loudongku_event = true;
			}
			if (value == 2) {
				this.loudongku_event = false;
			}
		},
		event_classify(value) {
			let param = {
				oneEventType: value
			}
			gettwoEventType_kuaibao(param).then(res => {
				this.gettwotype = res.data
			})
		},
		event_classify1(value) {
			let param = {
				twoEventType: value
			}
			getthreeEventType_kuaibao(param).then(res => {
				this.getthreetype = res.data;
			})

		},
		addLetters() {
			this.num = Math.random();
			this.form.eventTitle = "";
			this.form.submittedTime = "";
			this.form.releaseTime = "";
			this.form.informationSources = "";
			this.form.levelInference = undefined;
			this.form.oneEventType = undefined;
			this.form.twoEventType = undefined;
			this.form.threeEventType = undefined;
			this.form.mobile = undefined;
			this.form.businessImpact = undefined;
			this.form.mediaTypeId = undefined;
			this.form.province = "";
			this.resou_event = false;
			this.zhapian_option = false;
			this.loudong_option = false;
			this.loudongku_event = false;
			if (this.checkedList.length == 0) {
				this.$message.error('请选择记录');
				return;
			}
			if (this.checkedList.length > 1) {
				this.$message.error('只能选择一条记录')
				return;
			}
			if (this.checkedList.length == 1) {
				this.visible3 = true;

				event_detail({
					commandId: this.commandIds,
					id: this.checkedList[0],
				}).then(res => {
					if (res.status == 200) {
						this.$refs['ruleForm'].resetFields()
						this.form.departmentList1 = []
						this.form.departmentList2 = []
						this.form.departmentList3 = []
						this.form.departmentList4 = []
						this.form.departmentList5 = []
						this.form.informationSources = res.data.informationSources
						this.form.keyword = res.data.keyword
						this.form.content = res.data.content
						this.form.title = res.data.title
						this.form.province = res.data.province
						this.form.emotionalAcute = res.data.emotionalPolarity
						this.form.esId = res.data.esId
						this.form.userId = res.data.userId
						let url = window.atob(res.data.url)
						this.form.url = url
						console.log(res)
					} else {
						this.$message.error('获取信息失败');
					}
				}).catch(err => {
					console.log(err)
				})
			}

		},
		hideModal3() {

			if (this.form.eventTitle == "" || this.form.eventTitle == undefined) {
				this.$message.error('请输入事件标题');
				return
			}
			if (this.form.submittedTime == "" || this.form.submittedTime == undefined) {
				this.$message.error('请选择报告时间');
				return
			}
			if (this.form.releaseTime == "" || this.form.releaseTime == undefined) {
				this.$message.error('请选择发布时间');
				return
			}
			if (this.form.informationSources == "" || this.form.informationSources == undefined) {
				this.$message.error('请输入发布媒体');
				return
			}
			if (this.form.mediaTypeId == "" || this.form.mediaTypeId == undefined) {
				this.$message.error('请选择媒体类型');
				return
			}
			if (this.form.levelInference == "" || this.form.levelInference == undefined) {
				this.$message.error('请选择事件等级');
				return
			}
			if (this.form.oneEventType == "" || this.form.oneEventType == undefined) {
				this.$message.error('请选择事件分类');
				return
			}
			if (this.form.keyword == "" || this.form.keyword == undefined) {
				this.$message.error('请输入关键词');
				return
			}
			if (this.form.content == "" || this.form.content == undefined) {
				this.$message.error('请输入内容简介');
				return
			}
			if (this.form.title == "" || this.form.title == undefined) {
				this.$message.error('请输入原文标题');
				return
			}
			if (this.form.mobile == "" || this.form.mobile == undefined) {
				this.$message.error('请选择移动相关');
				return
			}
			if (this.form.businessImpact == "" || this.form.businessImpact == undefined) {
				this.$message.error('请选择业务相关');
				return
			}
			if (this.form.emotionalAcute == "" || this.form.emotionalAcute == undefined) {
				this.$message.error('请选择情感极性');
				return
			}

			let idlist = []
			if (this.form.departmentList1.length > 0) {
				this.form.departmentList1.forEach(item => {
					let obj = {}
					obj.id = item;
					obj.category = ''
					obj.name = ''
					idlist.push(obj)
				})
			}
			if (this.form.departmentList2.length > 0) {
				this.form.departmentList2.forEach(item => {
					let obj = {}
					obj.id = item;
					obj.category = ''
					obj.name = ''
					idlist.push(obj)
				})
			}
			if (this.form.departmentList3.length > 0) {
				this.form.departmentList3.forEach(item => {
					let obj = {}
					obj.id = item;
					obj.category = ''
					obj.name = ''
					idlist.push(obj)
				})
			}
			if (this.form.departmentList4.length > 0) {
				this.form.departmentList4.forEach(item => {
					let obj = {}
					obj.id = item;
					obj.category = ''
					obj.name = ''
					idlist.push(obj)
				})
			}
			if (this.form.departmentList5.length > 0) {
				this.form.departmentList5.forEach(item => {
					let obj = {}
					obj.id = item;
					obj.category = ''
					obj.name = ''
					idlist.push(obj)
				})
			}
			if (idlist.length <= 0 || idlist.length == []) {
				this.$message.error('请选择关联部门');
				return;
			}
			if (this.form.submittedTime != '') {
				this.form.submittedTime = (this.form.submittedTime).format('YYYY-MM-DD HH:mm:ss')
			}
			if (this.form.releaseTime != '') {
				this.form.releaseTime = (this.form.releaseTime).format('YYYY-MM-DD HH:mm:ss')
			}
			if (this.form.holePublicTime != '') {
				this.form.holePublicTime = (this.form.holePublicTime).format('YYYY-MM-DD HH:mm:ss')
			} else {
				this.form.holePublicTime = ''
			}
			if (this.form.fraudEvent.length > 0) {
				this.form.fraudEvent = this.form.fraudEvent.join(",")
			}


			let form = {
				id: this.checkedList.join(','),
				eventTitle: this.form.eventTitle,
				submittedTime: this.form.submittedTime,
				endSubmittedTime: this.form.endSubmittedTime,
				startSubmittedTime: this.form.startSubmittedTime,
				releaseTime: this.form.releaseTime,
				endReleaseTime: this.form.endReleaseTime,
				startReleaseTime: this.form.startReleaseTime,
				informationSources: this.form.informationSources,
				mediaTypeId: this.form.mediaTypeId,
				levelInference: this.form.levelInference,
				oneEventType: this.form.oneEventType,
				twoEventType: this.form.twoEventType,
				threeEventType: this.form.threeEventType,
				keyword: this.form.keyword,
				content: this.form.content,
				url: this.form.url,
				title: this.form.title,
				mobile: this.form.mobile,
				businessImpact: this.form.businessImpact,
				businessImpactName: this.form.businessImpactName,
				province: this.form.province,
				city: this.form.city,
				county: this.form.county,
				hot: this.form.hot,
				hotRanking: this.form.hotRanking,
				hotBang: this.form.hotBang,//热搜榜
				fraudEvent: this.form.fraudEvent,
				fraud: this.form.fraud,
				hole: this.form.hole,
				holeEvent: this.form.holeEvent,
				holeLibrary: this.form.holeLibrary,
				holePublicTime: this.form.holePublicTime,
				cveId: this.form.cveId,
				createTime: this.form.createTime,
				flag: this.form.flag,
				departmentId: 0,
				departmentList: idlist,
				emotionalPolarity: this.form.emotionalAcute,
				esId: this.form.esId,
				userId: this.form.userId
			};
			addFastReport(form).then(res => {
				if (res.data) {
					this.$message.success('操作成功');
					this.visible3 = false;

					afterFastReport({
						commandId: parseInt(this.commandIds),
						id: parseInt(this.checkedList[0]),
					}).then(res => {
						if (res.data) {
						}
					})
					this.queryInfomationData();
					this.checkedList = [];
				}
			})

		},

		addAnalysis() {
			this.create_event = false;
			this.exist_event = true;
			this.eventname_create = ''
			this.eventtype_create_01 = ''
			this.eventtype_create_02 = ''
			this.eventtype_create_03 = ''
			this.eventtype_exist_01 = ''
			this.eventtype_exist_02 = ''
			this.eventtype_exist_03 = ''
			this.eventname_exist = ''
			this.EventNameselect = true,
					this.oneEvent = true,
					this.twoEvent = true,
					this.threeEvent = true,
					this.addanalysis = ""
			this.addanalysisname = ""
			if (this.checkedList.length == 0) {
				this.$message.error('请选择记录');
			}
			if (this.checkedList.length > 0) {
				this.visible1 = true
			}

		},
		changebuttonzm(index, value) {
			var param2 = {
				commandId: this.commandIds,
				id: this.listData[index].id,
				value: value
			}
			confirm('确定修改该记录吗？', () => {
				emotion(param2).then(res1 => {
					if (res1.data == true) {
						this.$message.success("修改成功");
						this.queryInfomationData()
					}
				})
			});
		},
		refreshList() {
			let i = 0
			let params = {
				page: this.pagination.current,
				pageNumber: this.pagination.pageSize,
				orderField: "releaseTime",
				orderType: this.orderType,
				queryData: {
					count: 0,
					commandId: this.commandIds,
					id: 0,
					title: "",
					description: "",
					numbe: 0,
					emotionalPolarity: 0,
					mirrorAddress: "",
					whetherToPush: 0,
					subscribe: 0,
					whetherToCollect: 0,
					author: "",
					levelInference: "",
					keyword: "",
					keywordNumber: "",
					informationSources: "",
					mediaTypeId: "",
					endReleaseTime: "",
					releaseTime: "",
					startReleaseTime: "",
					releaseTimeLong: 0,
					tag: "",
					url: "",
					img: "",
					flag: 0,
					negativeWords: "",
					content: "",
					userId: 0,
					mediaType: "",
					urlMd5: "",
					esId: "",
					permissionGroupId: 0,
					commentVolume: 0,
					forwardVolume: 0,
					visitVolume: 0,
					source: this.imageRecognition,
					domain: "",
					createTimeLong: 0,
					reportFlag: 0,
					province: "",
					city: "",
					county: "",
					caseType: "",
					mobileType: "",
					chargeType: ""

				},
			}
			generalist(
					params,
			).then(res => {
				// base64解码
				for (let i = 0; i < res.data.records.length; i++) {
					res.data.records[i].url = window.atob(res.data.records[i].url);
				}
				this.listData = res.data.records;
				this.pagination.total = res.data.total;
				this.total = res.data.total;
				for (let k = 0; k < this.listData.length; k++) {
					if (this.listData[k].emotionalPolarity == 2) {
						this.emo_polarity[k] = '中性'
					}
					if (this.listData[k].emotionalPolarity == 1) {
						this.emo_polarity[k] = '正面'
					}
					if (this.listData[k].emotionalPolarity == 3) {
						this.emo_polarity[k] = '负面'
					}
				}
			});
		},
		changebuttonlevel(index, value) {
			let param3 = {
				commandId: this.commandIds,
				id: this.listData[index].id,
				value: value
			}
			confirm('确定修改该记录吗？', () => {
				editlevel(param3).then(res1 => {
					if (res1.data == true) {
						this.refreshList()
					}
				})
			});
		},
		// 取消框
		onChange1(e) {
			this.check_delete = !this.check_delete;
			if (e.target.checked) {
				this.check_flag = true;
				this.labels2 = this.labels;
				this.labels = '';
				this.labelgroup = [];
				this.check_delete = true;
			} else {
				this.check_flag = false;
				this.labels = this.labels2;
			}
		},
		onChangeList(checkedValues) {
			if (this.listData.length === this.checkedList.length) {
				this.checkAll = true;
			} else {
				this.checkAll = false;
			}
		},
		// 全选框
		onCheckAllChange(e) {
			this.checkAll = !this.checkAll
			if (this.checkAll) {
				this.checkedList.splice(0)
				this.listData.forEach((item, i) => {
					this.checkedList.push(item.id)
				})
			} else {
				this.checkedList.splice(0)
			}
		},
		boxSelect(index) {

			let boxs = document.querySelectorAll("input[type=checkbox]");
			console.log(boxs)
			if (boxs.length == 0) {
				this.idList = []
			} else {
				this.idList.push(this.listData[index].id)
			}
		},


		//标签弹框
		showLabel() {
			if (this.check_flag == true) {
				this.check_flag = false;
				this.check_delete = false;
			}

			console.log(this.labelgroup)
			if (this.checkedList.length == 0) {
				this.$message.error("请选择一行！");
			} else if (this.checkedList.length == 1) {
				let params = {
					page: this.pagination.current,
					pageNumber: this.pagination.pageSize,
					orderField: "",
					orderType: 1,
					queryData: {
						commandId: this.commandIds,
						id: this.checkedList.join(','),
					},
				}
			} else {
				this.visible = true;
			}
		},
		// 标签提交
		hideModal(checkedValues) {
			if (this.checkedList.length >= 1) {
				let params = {
					page: this.pagination.current,
					pageNumber: this.pagination.pageSize,
					orderField: "",
					orderType: 1,
					queryData: {
						count: 0,
						commandId: this.commandIds,
						ids: this.checkedList,
					},
				}
				generalist(
						params,
				).then(res => {
					this.esids = res.data.records[0].esId
					let records = res.data.records;
					if (this.labels == undefined && this.labels.length <= 0) {
						this.$message.error('请选择标签后在提交');
						this.visible = true;
					}
					if (this.labels == '') {
						this.labels = [];
					}
					if (this.labels == '清空标签') {
						this.labels = [];
					}
					let array = [];
					records.forEach(item => {
						array.push({
							esId: item.esId,
							commandId: this.commandIds,
							tagIds: this.labels
						})
					})
					confirm('确定修改该记录吗？', () => {
						editDataTags(array).then(res => {
							if (res.status == 200) {
								this.checkedList.splice(0)
								console.log(this.checkedList)
								this.$message.success('执行成功');
								this.visible = false;
								this.refreshList();
							} else {
								this.$message.error('执行失败');
							}
						});
					});
				});
			}

		},

		// 标签监听
		onChange(checkedValues) {
			console.log('checked = ', checkedValues);
			console.log('checked = ', checkedValues.length);

			this.labels = checkedValues;
			if (this.labelgroup.length > 0) {
				this.check_delete = false;
			}
		},

		suyuan() {
			if (this.mediaFlag === 3) {
				this.suyuanNews()
			} else {
				this.$router.push({
					path: '/generalDetectionroots',

				})
			}

		},
		suyuanNews() {
			this.$router.push({
				path: '/generalDetectionNewsroots',

			})
		},
		changePageInfo(i) {
			this.detial_id = i
			this.ifshow_list = false;
			this.ifshow_info = true;
		},


		/*查询*/
		queryInfomationData() {
			let i = 0
			let mediaTypeIdList = []
			this.checkedList_media.forEach((item) => {
				mediaTypeIdList.push(item)
			});
			this.checkedList_media2.forEach((item) => {
				mediaTypeIdList.push(item)
			});

			for (let i = 0; i < mediaTypeIdList.length; i++) {
				for (let k = 0; k < this.media_type.length; k++) {
					if (mediaTypeIdList[i] == this.media_type[k].mediaName) {
						this.checkedList_mediaId.push(this.media_type[k].id)
					}
				}
			}

			if (this.query.releaseTime) {
				this.query.startReleaseTime = new Date(moment(this.query.releaseTime[0]).format('YYYY-MM-DD HH:mm:00'));
				this.query.endReleaseTime = new Date(moment(this.query.releaseTime[1]).format('YYYY-MM-DD HH:mm:00'));
			}
			// 判断根据全文查询还是标题查询
			let reg = new RegExp("[!%@#$^&*]");
			if (reg.test(this.text)) {
				this.$message.error("请正确输入查询内容！");
				return;
			}
			if (this.queryFlag) {
				this.query.title = this.text
				this.query.content = '';
			} else {
				this.query.content = this.text
				this.query.title = '';
			}
			if (this.pagingFlag == undefined) {
				this.pagination.current = 1;
			}
			console.log(mediaTypeIdList)
			/*模拟数据变化 生成环境需要更改下面的代码*/
			let params = {
				page: this.pagination.current,
				pageNumber: this.pagination.pageSize,
				orderField: "releaseTime",
				orderType: this.orderType,
				queryData: {
					count: 0,
					commandId: this.commandIds,
					id: 0,
					title: this.query.title,
					description: "",
					numbe: 0,
					emotionalPolarity: this.query.emotionalPolarity,
					mirrorAddress: "",
					whetherToPush: 0,
					subscribe: 0,
					whetherToCollect: 0,
					mediaTypeIdList: this.checkedList_mediaId,
					author: this.query.author,
					levelInference: this.query.levelInference,
					keyword: this.query.keyword,
					keywordNumber: "",
					informationSources: this.query.informationSources,
					endReleaseTime: this.query.endReleaseTime,
					releaseTime: "",
					startReleaseTime: this.query.startReleaseTime,
					releaseTimeLong: 0,
					tag: "",
					url: "",
					img: "",
					flag: 0,
					negativeWords: "",
					content: this.query.content,
					userId: 0,
					mediaType: "",
					urlMd5: "",
					esId: "",
					permissionGroupId: 0,
					commentVolume: 0,
					forwardVolume: 0,
					visitVolume: 0,
					source: this.imageRecognition,
					domain: "",
					createTimeLong: 0,
					reportFlag: this.query.reportFlag,
					province: "",
					city: "",
					county: "",
					caseType: "",
					mobileType: "",
					chargeType: "",
					tagsId: this.query.label,
					weightStart: this.query.weightStart ? Number(this.query.weightStart) : null,
					weightEnd: this.query.weightEnd ? Number(this.query.weightEnd) : null
				},
			}
			generalist(
					params,
			).then(res => {
				if (res.data.records.length > 0) {
					// base64解码
					for (let i = 0; i < res.data.records.length; i++) {
						res.data.records[i].url = window.atob(res.data.records[i].url);
					}
					this.listData = res.data.records;
					this.pagination.total = res.data.total;
					this.total = res.data.total;
					for (let k = 0; k < this.listData.length; k++) {
						if (this.listData[k].emotionalPolarity == 2) {
							this.emo_polarity[k] = '中性'
						}
						if (this.listData[k].emotionalPolarity == 1) {
							this.emo_polarity[k] = '正面'
						}
						if (this.listData[k].emotionalPolarity == 3) {
							this.emo_polarity[k] = '负面'
						}
					}
				} else {
					this.listData = [];
					this.pagination.total = res.data.total;
					this.total = res.data.total;
				}
			});
			this.pagingFlag = undefined;
		},
		/*导出*/
		exportInfomation() {
			if (this.checkedList && this.checkedList.length == 0) {
				this.$message.error("请选择要导出的数据！");
				return;
			}

			var list = this.listData.filter(item => {
				return this.checkedList.includes(item.id);
			});
			// 判断并修改对应的值
			for (let i = 0; i < list.length; i++) {
				if (list[i].levelInference == 1) {
					list[i].levelInference = '一般级别';
				} else if (list[i].levelInference == 2) {
					list[i].levelInference = '中等级别';
				} else if (list[i].levelInference == 3) {
					list[i].levelInference = '重要级别';
				}
				if (list[i].emotionalPolarity == 1) {
					list[i].emotionalPolarity = '正面'
				} else if (list[i].emotionalPolarity == 2) {
					list[i].emotionalPolarity = '中性'
				} else if (list[i].emotionalPolarity == 3) {
					list[i].emotionalPolarity = '负面'
				}
				list[i].content = list[i].content ? list[i].content.substring(0, 130) : ''
			}
			console.log("导出数据", list);
			const columns = [
				{
					title: "事件标题",
					dataIndex: "title",
				},
				{
					title: "事件描述",
					dataIndex: "content",
				},
				{
					title: "关键词",
					dataIndex: "keyword",
				},

				{
					title: "发布媒体",
					dataIndex: "informationSources",
				},
				{
					title: "发布时间",
					dataIndex: "releaseTime",
				},
				{
					title: "火爆程度",
					dataIndex: "number",
				},
				{
					title: "文章级别",
					dataIndex: "levelInference",
				},
				{
					title: "作者",
					dataIndex: "author",
				},
				{
					title: "url",
					dataIndex: "url",
				},
				{
					title: "倾向性",
					dataIndex: "emotionalPolarity",
				},
			]
			export2Excel(columns, list);
			// 访问列表
			this.queryInfomationData();
		},
		/*删除*/
		deleteinfomation() {
			if (this.checkedList.length == 0) {
				this.$message.error("至少得选择一行！");
			} else {
				let params = {
					commandId: this.commandIds,
					idList: this.checkedList
				}
				confirm('确定删除该记录吗？', () => {
					deleteList(params).then(res => {
						console.log(res)
						this.$message.success("删除成功");
						this.refreshList()
					})
				});


			}
		},
		/*排序*/
		sequenceInfomation() {
			this.pagingFlag = 1;
			if (this.orderType == 1) {
				this.orderType = 2
			} else {
				this.orderType = 1
			}
			this.queryInfomationData()
		},
		showOtherMedia() {
			this.collspanMedia = !this.collspanMedia;
		},
		showQuery() {
			this.collspanQuery = !this.collspanQuery;
		},

		tuisong(index) {
			let param2 = {
				commandId: this.commandIds,
				id: this.listData[index].id,
			}
			confirm('确定推送该记录吗？', () => {
				editTuisong(param2).then(res1 => {
					if (res1.data == true) {
						this.$message.success("推送成功");
						this.refreshList()
					}
				})
			});
		},
		subscribe(index) {
			let param2 = {
				commandId: this.commandIds,
				id: this.listData[index].id,
			}
			confirm('确定订阅该记录吗？', () => {
				editDingyue(param2).then(res1 => {
					if (res1.data == true) {
						this.$message.success("订阅成功");
						this.refreshList()
					}
				})
			});

		},
		collection() {
			this.$message.success("收藏成功");
		},
		callback(tag) {
			if (tag == 1) {
				this.change = 1;
			}
			if (tag == 2) {
				this.change = 2;
			}
		},
		onSubmit() {
			console.log('submit!', this.form);
		},

	},
	mounted() {
		getOneEventType_kuaibao().then(res => {
			this.getonetype = res.data
		})
		getBusinessImpact().then(res => {
			this.getBusinessImpact = res.data
		})
		getprovice().then(res => {
			this.getprovice = res.data.provincelist
		})
		getDepartment().then(res => {
			let data = res.data;
			this.getDepartment_xazx = [];
			this.getDepartment_jt = [];
			this.getDepartment_qt = [];
			this.getDepartment_sgs = [];
			this.getDepartment_zygs = [];
			for (let i = 0; i < data.length; i++) {
				if (data[i].category == '信安中心') {
					this.getDepartment_xazx = data[i].departmentList
				}
				if (data[i].category == '集团') {
					this.getDepartment_jt = data[i].departmentList
				}
				if (data[i].category == '省公司') {
					this.getDepartment_sgs = data[i].departmentList
				}
				if (data[i].category == '专业公司') {
					this.getDepartment_zygs = data[i].departmentList
				}
				if (data[i].category == '其他') {
					this.getDepartment_qt = data[i].departmentList
				}
			}
		})
		this.form.ifzp = "2"
		this.form.ifld = "2"
		this.form.ifsearch = "2"
		this.form.vulnerdata = "2"
		this.form.hot = '2'
		this.form.fraud = '2'
		this.form.hole = '2'
		this.form.holeLibrary = '2'
	},

	created() {
		console.log(this.commandId2)
		console.log(this.rulename2)
		if ((this.commandId2 != undefined || this.commandId2 != '' || this.commandId2 != null) && (this.rulename2 != undefined || this.rulename2 != '' || this.rulename2 != null)) {
			this.commandIds = this.commandId2
			this.ruleNames = this.rulename2
			if (this.commandIds) {
				this.refreshList()
			}
			/* */
		}

		console.log(this.commandIds)
		getOneEventType().then(res => {
			this.getOneEventType = res.data
			this.getOneEventType_create = res.data

		})

		// 获取媒体类型
		getMediaTypeList().then(res => {
			this.media_type = res.data;
		});
		let userId = 1


	},


}
</script>

<style scoped lang="scss">
.modal-box4 /deep/ .ant-modal-body {
	min-height: 594px;
}

.modal-box4 /deep/ .ant-modal-content {
	height: 700px;
}

/deep/ .listgroup .ant-checkbox-group {
	display: block !important;
}

/deep/ .ant-checkbox-wrapper + .ant-checkbox-wrapper {
	margin-left: 0px
}

/deep/ .zhapian_check.ant-checkbox-group {
	line-height: 2.5
}

/deep/ .checkboxs .ant-checkbox-group {
	line-height: 2.5
}

/deep/ .checkboxs .ant-checkbox-group {
	line-height: 2.5
}

/deep/ .eventtype.ant-select {
	margin-left: 20px !important;
	width: 150px

}

/deep/ .eventtype1.ant-select {
	margin-left: -30px !important;
	width: 150px

}

/deep/ .eventtype2.ant-select {
	margin-left: -20px !important;
	width: 150px

}

/deep/ .eventtype3.ant-select {
	margin-left: 20px !important;
	width: 150px

}

/deep/ .eventtype4 .ant-select {
	margin-left: 20px !important;
	width: 150px

}

/deep/ .eventtype5 ant-form-item-control {
	width: 100px

}

.add /deep/ .ant-form-item-control {
	margin-left: 77px;
	margin-top: -31px;
	width: 120px;
}

.add2 /deep/ .ant-form-item-control {
	margin-left: 77px;
	margin-top: -31px;
	width: 173px;
}

.add3 /deep/ .ant-form-item-control {
	margin-left: 77px;
	margin-top: -31px;
}

.add4 /deep/ .ant-form-item-control {
	margin-left: 77px;
	margin-top: -31px;
	width: 200px;
}

.overflow {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.modal-box /deep/ .ant-modal-body {
	min-height: 194px;
}

.modal-box /deep/ .ant-modal-content {
	height: 300px;
}

.visible1 /deep/ .ant-modal-body {
	min-height: 205px
}

.visible1 /deep/ .ant-modal-content {
	height: 325px;
}

.modal-box2 /deep/ .ant-modal-body {
	min-height: 215px
}

.modal-box2 /deep/ .ant-modal-footer {
	min-height: 60px
}

.right-content {
	margin-bottom: 40px;
	padding-right: 10px;

	.ant-row {
		height: 50px;
		line-height: 50px;

		.content-left {
			text-align: right;
			font-size: 14px;
			height: 100%;
		}

		.content-right {
			float: right;
			height: 100%;
			position: relative;
			left: -30px;

			.ant-input {
				width: 480px;
				height: 40px;
				border-radius: 3px;
			}
		}
	}
}

/deep/ .ant-tabs-bar {
	border-bottom: 0px solid #e8e8e8 !important;
}

/deep/ .ant-tabs-tab {
	font-size: 15px !important;
}

.listv2-root {
	width: 100%;
	height: 100%;
	position: relative;
}

/deep/ .ant-list-item-meta-avatar {
	margin-right: 0px;
}

/deep/ .buttona1 > div {
	color: black;
	font-size: 13px;
	cursor: pointer;
}

.changebuttonStyle {
	background: #1577FF;
	padding: 0 10px;
	height: 25px;
	color: #fff;
	border-radius: 5px;
	line-height: 25px;
	cursor: pointer;
}

.divtext {
	/*border: solid #F0F0F0 1px;*/
	/*text-align: center;*/
	/*padding-left: 1%;*/
	/*padding-right: 1%;*/
	/*margin-right: 1%;*/
	margin: 0 4.5px;
	color: black;
}

.titleDiv {
	height: 40px;
	margin-top: 15px;
	display: flex;
	justify-content: space-between;
	align-items: center
}

.titleFontDiv {
	font-size: 14px;
	font-weight: bold;
	margin-left: 30px;
	display: flex
}

.fontBottomLine {
	border-bottom: 2px solid #1678FF;
	height: 25px
}

.backButton {
	height: 40px;
	width: 80px;
	align-items: center;
	line-height: 40px;
	border: 1px solid #E6E6E6;
	text-align: center;
	margin-right: 50px;
	border-radius: 10px;
	cursor: pointer;
}

@media screen and (max-device-width: 2560px) {
	#lineChart {
		width: 1213px;
	}
	#lineChart2 {
		width: 1213px;
	}
	#pieChart {
		width: 595px;
	}
}

@media screen and (max-device-width: 1920px) {
	#lineChart {
		width: 1213px;
	}
	#lineChart2 {
		width: 1213px;
	}
	#pieChart {
		width: 595px;
	}
}

.scatterLabel {
	height: 30px;
	line-height: 30px;
	padding: 0 10px;
	cursor: pointer;
}

.scatterLabelActive {
	background-color: #1777FF;
	border-radius: 6px;
	color: white;
}

.ant-list-pagination {
	position: absolute;
	left: 35%;
}

.ant-btn-primary {
	color: #ffffff;
}

.tableTr {
	border: 1px solid #F5F8FF;
	height: 35px;
	width: 100%;
	background-color: white;
	display: flex;
	align-items: center;
	color: #A0A4AA;
}

.tableTd20 {
	width: 20%;
	text-align: center
}

.tableTd30 {
	width: 30%;
	text-align: center
}

.tableTd50 {
	width: 50%;
	text-align: center;
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-around;
}
</style>
